const http = require('http');
const server = http.createServer((request,response)=>{
    response.setHeader('Content-type','text/html');
    response.setHeader('X-Foo','bar');
    response.writeHead(200,{'Content-type':'text/plan'});
    response.end(
    `<html htmlatr=html>
        <head> 
            <style>
                #container{
                    width:500px;
                    height:300px;
                    display:flex;
                    background-color:rgb(255,255,255);
                }
                #container #myid{
                    width: 200px;
                    height:100px;
                    backgroun-color: rgb(255,0,0);
                }
                #container .cl{
                    flex:1;
                    background-color: rgb(0,255,0);
                }
            </style>
        </head>
        <body>
            <div id="container">
                <div id="myid"/>
                <div class="cl"/>
            </div>
        </body>
    </html>`);
});
server.listen(8888,()=>{
    console.log('启动服务监听-8888')
})